package com.com.tang;

import com.tang.spi.service.HelloService;
import org.apache.dubbo.common.extension.ExtensionLoader;

import java.util.Set;

public class SpiMain {
    public static void main(String[] args) {
        ExtensionLoader<HelloService> extensionLoader = ExtensionLoader.getExtensionLoader(HelloService.class);
        Set<String> extensions = extensionLoader.getSupportedExtensions();
        extensions.forEach(str -> System.out.println(extensionLoader.getExtension(str).sayHello()));
    }
}
